#ifndef __CM51_H
#define __CM51_H
#ifdef __cplusplus
extern "C" {
#endif

#define     __O     volatile             /*!< Defines 'write only' permissions */
#define     __IO    volatile             /*!< Defines 'read / write' permissions */


typedef unsigned char   uint8_t;
typedef unsigned int    uint16_t;
typedef unsigned long   uint32_t;
typedef char            int8_t;
typedef int             uint16_t;
typedef long            uint32_t;

typedef enum
{
    RV_SUCCESS = 0,
    RV_FAIL
} RV;

typedef uint8_t BOOL;


#define FOSC     22118400(UL)           /*Main internal IRC frequency Hz*/
/*#define FOSC     11059200(UL) */
#define false    0
#define true     !false
#ifdef __cplusplus
}
#endif
#endif